<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\Collection;
use App\Models\Access\user;
class Log extends Model
{
    //
    protected $table = 'log';
    protected $fillable = ['id','user_id','client_ip','action'];
    protected $primaryKey = 'id';

    public $timestamps = false;

    /**
     * 关联查询用户信息
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function user()
    {
        return $this->hasOne('App\Models\Access\User\User','id','user_id');
    }
}
